
// 一个状态模块其实就是一个 reducer
const reducer = (state = {
    // 全局状态
    bannerList: [],
    proList: []
}, actions) => {

    switch (actions.type) {
        case 'change_banner_list':

            return { ...state, bannerList: actions.payload }
        case 'change_pro_list':

            return { ...state, proList: actions.payload }
        default:
            return state
    }
}

export default reducer